package com.itbaizhan.controller;

import com.itbaizhan.common.BaseResponse;
import com.itbaizhan.service.IBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 业务控制器
 */
@RestController
@RequestMapping("/business")
public class BusinessController {

    @Autowired
    private IBusinessService iBusinessService;

    @PostMapping("/save")
    public BaseResponse save(String userId, String commodityCode, Integer count, Integer money){
        BaseResponse save = iBusinessService.save(userId, commodityCode, count, money);
        return save;
    }

}
